import request from '@/utils/request'


/**
 * 获取计费规则列表
 * @param {*} params 
 * @returns 
 */
export function getRuleListAPI(params) {
  return request({
    url: '/parking/rule/list',
    method: 'get',
    params
  })
}


/**
 * 添加计费规则
 * @param {*} data 
 * @returns 
 */
export function addFeeRuleAPI(data) {
  return request({
    url: '/parking/rule',
    method: 'post',
    data
  })
}

/**
 * 删除计费规则
 * @param {*} id 
 * @returns 
 */

export function delRuleAPI(id) {
  return request({
    url: `/parking/rule/${id}`,
    method: 'delete'
  })
}

/**
 * 获取计费规则详细
 * @param {*} id 
 * @returns 
 */
export function getParkingRuleAPI(id) {
  return request({
    url: `/parking/rule/${id}`
  })
}


/**
 * 编辑计费规则
 * @param {*} data 
 * @returns 
 */

export function editParkingRuleAPI(data) {
  return request({
    url: '/parking/rule',
    method: 'put',
    data
  })
}